package com.baizhi.service.impl;

import com.baizhi.dao.CmfzLessonMapper;
import com.baizhi.entity.CmfzLesson;
import com.baizhi.service.CmfzLessonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Service
@Transactional
public class CmfzLessonServiceImpl implements CmfzLessonService {
    @Autowired
    private CmfzLessonMapper cmfzLessonMapper;
    @Override
    public List<CmfzLesson> getMyLesson(int userId) {
        return cmfzLessonMapper.getMyLesson(userId);
    }

    @Override
    public void addLesson(String lessonName,int userId) {
        cmfzLessonMapper.addLesson(lessonName,userId);
    }

    @Override
    public void deleteLesson(Integer lessonId) {
        cmfzLessonMapper.deleteLesson(lessonId);
    }
}
